#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
ENV ASPNETCORE_URLS=http://+:5182
EXPOSE 5182

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish
WORKDIR /src
# COPY ["Stickerwall.Common/Stickerwall.Common.csproj", "Stickerwall.Common/"]
# COPY ["Stickerwall.DataAccessors.PgSQL/Stickerwall.DataAccessors.PgSQL.csproj", "Stickerwall.DataAccessors.PgSQL/"]
COPY . .
WORKDIR /src/Stickerwall.WebAPI
RUN dotnet publish "Stickerwall.WebAPI.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Stickerwall.WebAPI.dll"]